package com.hzw.saas.api.hpc;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hzw.saas.api.hpc.bo.HpcAccountInfoContractFullBO;
import com.hzw.saas.api.hpc.bo.HpcAccountInfoFullBo;
import com.hzw.saas.api.hpc.enums.HpcAccountStatus;
import com.hzw.saas.api.hpc.enums.HpcProviderType;
import com.hzw.saas.common.config.util.PageParam;

import java.util.List;

/**
 * HPC信息检索接口
 *
 * @Date 2021/7/30 10:32 上午
 * @Created by sonam
 */
public interface IHpcAccountSearchService {

    IPage<HpcAccountInfoContractFullBO> pageHpcAccountInfoContractFull(PageParam pageParam,
                                                                       String keyWord,
                                                                       Integer type,
                                                                       List<String> levelIds,
                                                                       Boolean contractBound,
                                                                       List<String> slurmAccounts,
                                                                       Integer expireSort,
                                                                       Integer createSort,
                                                                       HpcProviderType hpcProviderType);

    /**
     * @param pageParam
     * @param keyWord   关键字
     * @param type      查询内容,1-未分配,2-已分配,3-已冻结,4-需要补充
     * @return
     */
    IPage<HpcAccountInfoFullBo> pageHpcAccountInfoFull(PageParam pageParam,
                                                       String keyWord,
                                                       Integer type,
                                                       List<String> levelIds,
                                                       Boolean contractBound,
                                                       List<String> slurmAccounts,
                                                       Integer expireSort,
                                                       Integer createSort,
                                                       HpcProviderType hpcProviderType);


    /**
     * 查询已分配的HPC用户列表
     *
     * @param pageParam
     * @param keyWord
     * @param hpcAccountStatus 是否冻结，1｜正常，0｜冻结，可以为空
     * @param levelIds
     * @return
     */
    IPage<HpcAccountInfoFullBo> pageAllotHpcAccountInfoFull(PageParam pageParam,
                                                            String keyWord,
                                                            List<String> levelIds,
                                                            HpcAccountStatus hpcAccountStatus,
                                                            Boolean contractBound,
                                                            List<String> slurmAccounts,
                                                            Integer expireSort,
                                                            Integer createSort,
                                                            HpcProviderType hpcProviderType);

    /**
     * 查询未分配的HPC列表
     *
     * @param pageParam
     * @param keyWord
     * @param lacked
     * @return
     */
    IPage<HpcAccountInfoFullBo> pageNotAllotHpcAccountInfoFull(PageParam pageParam,
                                                               String keyWord,
                                                               Boolean lacked,
                                                               HpcProviderType hpcProviderType);
}
